﻿CREATE TABLE [dbo].[Organisation] (
    [OrgKey]           INT            IDENTITY (1, 1) NOT NULL,
    [OrgTS]            NVARCHAR (18)  COLLATE Latin1_General_CI_AS NULL,
    [Änderung]         DATETIME       NULL,
    [Prefix]           NVARCHAR (50)  COLLATE Latin1_General_CI_AS NULL,
    [Name]             NVARCHAR (50)  COLLATE Latin1_General_CI_AS NULL,
    [ZusätzeFW]        NVARCHAR (50)  COLLATE Latin1_General_CI_AS NULL,
    [RechtsFKey]       INT            NULL,
    [Suchbegriff]      NVARCHAR (50)  COLLATE Latin1_General_CI_AS NULL,
    [Abteilung]        NVARCHAR (50)  COLLATE Latin1_General_CI_AS NULL,
    [Adresse]          NVARCHAR (70)  COLLATE Latin1_General_CI_AS NULL,
    [EPLZ]             INT            DEFAULT ((0)) NULL,
    [Straße]           NVARCHAR (50)  COLLATE Latin1_General_CI_AS NULL,
    [TelNr1]           NVARCHAR (20)  COLLATE Latin1_General_CI_AS NULL,
    [TelNr2]           NVARCHAR (20)  COLLATE Latin1_General_CI_AS NULL,
    [FaxNr]            NVARCHAR (25)  COLLATE Latin1_General_CI_AS NULL,
    [e_Mail]           NVARCHAR (100) NULL,
    [Kurzwahlspeicher] NVARCHAR (10)  COLLATE Latin1_General_CI_AS NULL,
    [KG]               BIT            DEFAULT ((0)) NULL,
    [MB]               BIT            DEFAULT ((0)) NULL,
    [TochterVon]       INT            NULL,
    [Kreditlimit]      INT            DEFAULT ((0)) NULL,
    [Notiz]            NVARCHAR (MAX) NULL,
    [export]           BIT            DEFAULT ((0)) NULL,
    [CreateOn]         DATETIME2 (7)  DEFAULT (sysdatetime()) NOT NULL,
    [CreateBy]         NVARCHAR (20)  NULL,
    [LastChangedOn]    DATETIME2 (7)  NULL,
    [LastChangedBy]    NVARCHAR (20)  NULL,
    [UID]              NVARCHAR (50)  NULL,
    [Web]              NVARCHAR (255) NULL,
    CONSTRAINT [PK_Organisation] PRIMARY KEY CLUSTERED ([OrgKey] ASC)
);





